home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)TB / (A)TBY.ADF / Soundzap / SoundZAP.h < prev   
C/C++ Source or Header  |  1992-03-19  |  2KB  |  76 lines

  1. void GiveUsage();
  2. void ProcessOpt(struct options *, char *);
  3. void CleanUp(struct options *, int);
  4. void AnalyzeData(struct options *);
  5. void GuidoCheck(struct options *);
  6. void ConvertRaw(struct options *);
  7. void WriteIFFStuff(struct options *);
  8. void ConvertVOC(struct options *);
  9. void ConvertWAV(struct options *);
  10. void ConvertMAC(struct options *);
  11. void ConvertAU(struct options *);
  12. void ConvertIFF(struct options *);
  13. void maketable(signed char *, int);
  14. int  ulaw2linear(unsigned char);
  15. int  getscale(struct options *);
  16.  
  17. #define MAX(a,b) (((a) > (b)) ? (a) : (b))
  18.  
  19. #define DEFAULT_SIZE 51200
  20. #define DEFAULT_RATE 11395
  21.  
  22. #define RAW     'r'
  23. #define AU      'u'
  24. #define IFF     'i'
  25. #define VOC     'v'
  26. #define UNKNOWN 'k'
  27.  
  28. struct options
  29. {
  30.     ULONG BuffSize;
  31.     BOOL FlipSign;
  32.     ULONG Bits;
  33.     BOOL KillChunk;
  34.     UWORD SampRate;
  35.     BOOL IFFOut;
  36.     char InType;
  37.     BOOL MuLaw;
  38.     BOOL SampChk;
  39.     ULONG Size;
  40.     UBYTE *Data;
  41.     char inname[33];
  42.     char outname[33];
  43. };
  44.  
  45. typedef struct
  46. {
  47.     ULONG magic,
  48.           hrd_size,
  49.           data_size,
  50.           encoding,
  51.           sample_rate,
  52.           channels;
  53. } AUHeader;
  54.  
  55. char Author[] = {"SoundZAP V2.3  "};
  56.  
  57. char Annotation[] = {"SoundZAP by mrc113@psuvm.psu.edu   "};
  58.  
  59. char *ErrorMessages[] = {
  60.  
  61.     "How the hell did you get this message???\n",
  62.     "No filenames specified!\n",
  63.     "No buffer size specified!\n",
  64.     "No sample rate specified!\n",
  65.     "Invalid switch!\n",
  66.     "Couldn't allocate memory!\n",
  67.     "Input file not found!\n",
  68.     "Probably text, not sound.\n",
  69.     "Error opening output file!\n",
  70.     "Unsupported compression format.\n",
  71.     "Write error!\n",
  72.     "Error in IFF file!\n"
  73. };
  74.  
  75. struct FileHandle *in, *out;
  76.